<?php session_start();

	include "connect.php";
			
	$no=$_GET['no'];
	$nick=$_SESSION['nick'];
	$content=$_POST['content'];

	$query = "INSERT INTO comment (no, writer, content) VALUES ('$no', '$nick', '$content')";
	if(!mysql_query($query, $connect)) die('Error: '.mysql_error());
	mysql_close($connect);
			
	echo "<script> document.location.href='view.php?no=$no';</script>";
?>
